package com.zenithsun.common.review.model;

import java.util.Date;

import com.syzg.base.merge.model.Person;



/**
 * Reviewdetail entity. @author MyEclipse Persistence Tools
 */

public class Reviewdetail implements Comparable<Reviewdetail> {

	// Fields

	private String id;
	private Review review;
	private String userId;
	private Person person;
	private Short state;
	private String comments;
	private Date createTime;
	
	// Constructors

	/** default constructor */
	public Reviewdetail() {
	}

	/** minimal constructor */
	public Reviewdetail(String id, String userId, Short state, String comments,Date createTime) {
		this.id = id;
		this.userId = userId;
		this.state = state;
		this.comments = comments;
		this.createTime = createTime;
	}

	/** full constructor */
	public Reviewdetail(String id, Review review, String userId, Short state,String comments, Date createTime) {
		this.id = id;
		this.review = review;
		this.userId = userId;
		this.state = state;
		this.comments = comments;
		this.createTime = createTime;
	}

	// Property accessors

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Review getReview() {
		return this.review;
	}

	public void setReview(Review review) {
		this.review = review;
	}

	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Short getState() {
		return this.state;
	}

	public void setState(Short state) {
		this.state = state;
	}

	public String getComments() {
		return this.comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Person getPerson() {
		return person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}

	/**
	 * 实现对TreeItem的排序<br/>
	 * 返回1为升序，-1位降序
	 */
	@Override
	public int compareTo(Reviewdetail o) {
		if (o != null) {
			return o.getCreateTime().compareTo(this.getCreateTime());
		}
		return -1;
	}
}